package com.leapp.sk.viewdelegate.adapter.find

import android.widget.ImageView
import android.widget.LinearLayout
import cc.vv.lkbasecomponent.util.LKScreenUtil
import com.example.mvp.delegate.BaseAdapterDelegate
import com.leapp.sk.R

/**
 * 试听课睡前故事
 * @author  chaohaipeng  on 2018/8/15.
 */
class BeBedTimeStoryMAdapterDelegate :BaseAdapterDelegate(){
    override fun getOptionsMenuId(): Int {
        return 0
    }

    override fun initWidget() {
    }

    override fun onDestroy() {
    }

    override fun initLayoutRes(): Int {
        return R.layout.adapter_be_bed_time_story_m
    }

    /**
     * 设置数据
     */
   fun  setData(){
        val iv_abbts_image = getView<ImageView>(R.id.iv_abbts_image)
        val layoutParams:LinearLayout.LayoutParams = iv_abbts_image.layoutParams as LinearLayout.LayoutParams
        layoutParams.width=LKScreenUtil.getScreenWidth()/3-LKScreenUtil.dp2px(20f)
        layoutParams.height=LKScreenUtil.getScreenWidth()/3-LKScreenUtil.dp2px(20f)
        iv_abbts_image.layoutParams=layoutParams
   }


}